
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../static/resource/favicon.ico">

    <title>Sign in</title>

    <!-- Bootstrap core CSS -->
    <link href="../assets/css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="../assets/css/signin.css" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="/assets/css/application.css">


    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="../assets/javascripts/js/ie/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <div class="container">
    <div></div>
    <div>
    <h2 class="page-header text-primary">Please sign in</h2>
    </div>

      <div class="col-sm-12 well">
      <form class="form-signin" method="post" action="../auth/login">
        
        
        <label name="username" class="sr-only">Email address</label>
        <input type="text" id="inputEmail" class="form-control" name="username" placeholder="User Name" required autofocus>
        
        <label name="password" class="sr-only">Password</label>
        <input type="password" id="inputPassword" class="form-control" name="password" placeholder="Password" required>

        <div class="checkbox">
          <label>
            <input type="checkbox" value="remember-me" onclick="remember(this)"> Remember me
          </label>
        </div>

        <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
      </form>
      </div>

    </div> <!-- /container -->


    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="../assets/javascripts/js/ie/ie10-viewport-bug-workaround.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">
    
    function remember(self)
    {
        $.ajax({
              url: '../auth/keepCookie',
              type: 'POST',
              data: {'checked': self.checked},
              datatype: 'html',
              success: function(response){
                //alert('Success!');                
              },
              error: function(response) {
                //alert('Fail!');  
              }
        });
    }

    function change_mode(mode)
    {
        $.ajax({
              url: '../auth/changeMode',
              type: 'POST',
              data: {'mode': mode},
              datatype: 'html',
              success: function(response){
                //alert('Success!');                
              },
              error: function(response) {
                //alert('Fail!');  
              }
        });
    }

    function reset_mode() {
        change_mode("normal");
    }
    window.onload = reset_mode;

    </script>>
  </body>
</html>
